package com.mybatis_plus.demo;

import com.baomidou.mybatisplus.plugins.PaginationInterceptor;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.transaction.annotation.EnableTransactionManagement;

/**
 * @author lbb
 * @Description: 分页插件配置类
 * @date 2018/10/17 11:13
 */

@EnableTransactionManagement
@Configuration
@MapperScan("com.mybatis_plus.demo*")
public class MybatisPlusConfig {

    /**
     * 分页插件
     */
    @Bean
    public PaginationInterceptor paginationInterceptor() {
        return new PaginationInterceptor();
    }
}
